<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="domain.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>top</title>
<style type="text/css">
.STYLE1 {
	color: #43860c;
	font-size: 12px;
}
</style>
<%-- 导入用户登陆退出和处理函数定义 --%>
<script type="text/javascript" src="js/inc/top.js"></script>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
  <tr>
    <td height="47" background="images/main/main_09.gif">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="34" height="47" background="images/main/main_06.gif"></td>
        <td width="79"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="29" background="images/main/main_07.gif">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" background="images/main/main_14.gif">
	            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
	              <tr>
	                <td  style="width:1px;">&nbsp;</td>
	                <td ><span class="STYLE1">
	                	<%
	                		Object user = session.getAttribute("user");
	                		if (user instanceof Student) {
	                			Student stu = (Student)user;
	                			out.print(stu.getName() + ", 同学");
	                		} else if (user instanceof Teacher) {
	                			Teacher tch = (Teacher)user;
	                			out.print(tch.getName() + ", 老师");
	                		} else {
	                			Manager m = (Manager)user;
	                			out.print(m.getName() + ", 管理员");
	                		}
	                	%>
	                	</span></td>
	              </tr>
	            </table>
           </td>
          </tr>
        </table>
       </td>
        <td width="196" background="images/main/main_08.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="23" valign="bottom">
            	<img src="images/main/main_12.gif" width="161" height="23" border="0" usemap="#Map"/>
            </td>
            <td width="200" valign="bottom" align="left">
            	<table width="100%" border="0" cellspacing="0" cellpadding="0">
            	<tr>
            		<td valign="bottom"><span class="STYLE1">更换皮肤：</span></td>
            		<td valign="bottom"><span id="changeSkin"></span></td>
            		<td width="40">&nbsp;</td>
            	</tr>    
            	</table>   	
            </td>
          </tr>
        </table></td>
        <td width="200" background="images/main/main_11.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="11%" height="23">&nbsp;</td>
            <td width="89%" valign="bottom">
            	<span class="STYLE1">日期：
            		<script type="text/javascript">
            			var date = new Date();
            			var year = date.getFullYear();
            			var month = date.getMonth() + 1;
            			var day = date.getDate();
            			var week = date.getDay();
            			var theWeek;
            			switch(week) {
            				case 0: theWeek="星期日"; break;
            				case 1: theWeek="星期一"; break;
            				case 2: theWeek="星期二"; break;
            				case 3: theWeek="星期三"; break;
            				case 4: theWeek="星期四"; break;
            				case 5: theWeek="星期五"; break;
            				case 6: theWeek="星期六"; break;
            			}
            			document.write(year + "年" + month + "月" + day + "&nbsp;" + theWeek);
            		</script>
            	</span>
            </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

	<map name="Map" id="Map">
		<area shape="rect" coords="2,2,48,21" href="javascript: home();" />		
		<area shape="rect" coords="53,3,99,21" href="javascript: flush();" />
		<area shape="rect" coords="105,2,157,21" href="javascript: leave();"/>
	</map>
</body>
</html>
